;;; init-key-fun.el --- This is a file about keyboard setting

;;; Commentary:
;; Here gets some keyboards and some functions that could be used when the
;; Emacs started.

;;; Code:

;;; Get init.el
    (defun open-my-emacs-file()
      (interactive)
      (find-file "~/.emacs.d/init.el"))

    (global-set-key (kbd "C-<f10>") 'open-my-emacs-file)

;;; Change line space
(defun init-line-spacing()
  (interactive)
  (setq line-spacing 3))

(defun textedit-line-spacing()
  (interactive)
  (setq line-spacing 19)
  )

;;; Org mode global keys
(global-set-key "\C-cl" 'org-store-link)
(global-set-key "\C-ca" 'org-agenda)
(global-set-key "\C-cc" 'org-capture)
(global-set-key "\C-cb" 'org-iswitchb)

;;; Youdao search
(global-set-key (kbd "\C-ct") 'youdao-dictionary-search)
(global-set-key (kbd "C-<f9>") 'youdao-dictionary-search-at-point)

;;; Swiper
(global-set-key "\C-s" 'swiper)
(global-set-key (kbd "C-<f6>") 'ivy-resume)
(global-set-key (kbd "M-x") 'counsel-M-x)
(global-set-key (kbd "C-x C-f") 'counsel-find-file)
;;(global-set-key (kbd "<f1> f") 'counsel-describe-function)
;;(global-set-key (kbd "<f1> v") 'counsel-describe-variable)
;;(global-set-key (kbd "<f1> l") 'counsel-find-library)
;;(global-set-key (kbd "<f2> i") 'counsel-info-lookup-symbol)
;;(global-set-key (kbd "<f2> u") 'counsel-unicode-char)
;;(global-set-key (kbd "C-c g") 'counsel-git)
;;(global-set-key (kbd "C-c j") 'counsel-git-grep)
;;(global-set-key (kbd "C-c k") 'counsel-ag)
;;(global-set-key (kbd "C-x l") 'counsel-locate)
;;(global-set-key (kbd "C-S-o") 'counsel-rhythmbox)
;;(define-key read-expression-map (kbd "C-r") 'counsel-expression-history)

(provide 'init-key-fun-set)
;;; init-key-fun-set.el ends here
